<nz-card [nzBordered]="false" nzTitle="字段内容" [nzExtra]="extraOp" style="float: left; width: 100%">
  <ng-template #extraOp>
    <button nz-button nz-button nzType="default" nzDanger (click)="remove($event)">删除<i nz-icon nzType="close"></i></button>
  </ng-template>

  <nz-form-item>
    <nz-form-label nzFor="FieldName" nzRequired [nzSm]="3" [nzXs]="24">字段名称</nz-form-label>
    <nz-form-control [nzValidateStatus]="FormField.FieldNamenzValidateStatus" [nzErrorTip]="FormField.FieldNamenzValidatingTip">
      <input nz-input [(ngModel)]="FormField.FieldName" placeholder="请输入字段名称" (ngModelChange)="dtpChange($event)" />
    </nz-form-control>
  </nz-form-item>

  <nz-form-item>
    <nz-form-label [nzSm]="3" [nzXs]="24">是否为必填</nz-form-label>
    <nz-form-control nzErrorTip="是否为必填">
      <!-- <input nz-input [(ngModel)]="DeviceTypePropertity.IsRequired" placeholder="请输入默认值" /> -->

      <nz-switch [(ngModel)]="FormField.IsRequired"></nz-switch>
    </nz-form-control>
  </nz-form-item>

  <nz-form-item>
    <nz-form-label [nzSm]="3" [nzXs]="24">单位</nz-form-label>
    <nz-form-control nzErrorTip="单位">
      <!-- <input nz-input [(ngModel)]="DeviceTypePropertity.IsRequired" placeholder="请输入默认值" /> -->
      <input nz-input [(ngModel)]="FormField.FieldUnit" placeholder="请输入" />
    </nz-form-control>
  </nz-form-item>

  <nz-form-item>
    <nz-form-label nzRequired [nzSm]="3" [nzXs]="24">索引</nz-form-label>
    <nz-form-control [nzValidateStatus]="FormField.FieldCodenzValidateStatus" [nzErrorTip]="FormField.FieldCodenzValidatingTip">
      <input (ngModelChange)="dtcChange($event)" nz-input [(ngModel)]="FormField.FieldCode" placeholder="请输入默认值" nzRequired />
    </nz-form-control>
  </nz-form-item>
  <nz-form-item>
    <nz-form-label [nzSm]="3" [nzXs]="24">控件类型</nz-form-label>
    <nz-form-control nzErrorTip="控件类型">
      <nz-select
        nzShowSearch
        nzAllowClear
        nzPlaceHolder="字段类型"
        (ngModelChange)="FormFieldUITypeChange($event)"
        [(ngModel)]="FormField.FieldUIElement"
      >
        <nz-option *ngFor="let o of AllControlType" [nzValue]="o.value" [nzLabel]="o.label"> </nz-option>
      </nz-select>
    </nz-form-control>
  </nz-form-item>

  <nz-form-item *ngIf="DSVisble">
    <nz-form-label [nzSm]="3" [nzXs]="24">数据源</nz-form-label>
    <nz-form-control nzErrorTip="数据源">
      <input nz-input [(ngModel)]="FormField.FieldValueDataSource" placeholder="请输入" />
    </nz-form-control>
  </nz-form-item>

  <nz-form-item *ngIf="DefaultVisble">
    <nz-form-label [nzSm]="3" [nzXs]="24">默认值</nz-form-label>
    <nz-form-control nzErrorTip="默认值">
      <input nz-input [(ngModel)]="FormField.FieldValue" placeholder="请输入默认值" />
    </nz-form-control>
  </nz-form-item>
  <sf #sf [schema]="FormField.schema" (formSubmit)="submit()" [button]="'none'"></sf>

  <nz-form-item>
    <nz-form-label [nzSm]="3" [nzXs]="24">目标类型</nz-form-label>
    <nz-form-control nzErrorTip="目标类型">
      <nz-select nzShowSearch nzAllowClear nzPlaceHolder="目标类型" [(ngModel)]="FormField.FieldValueType">
        <nz-option *ngFor="let o of SuportType" [nzValue]="o.value" [nzLabel]="o.label"> </nz-option>
      </nz-select>
    </nz-form-control>
  </nz-form-item>
</nz-card>
